<html>
    <head>
        <style>
            *{margin: 0; padding: 0;}
            @font-face
            {
                font-family: "Ubuntu";
                src: url('fonts/Ubuntu-Bold.ttf')		 
            } 
            @font-face
            {
                font-family: "Ubuntu Light";
                src: url('fonts/Ubuntu-Light.ttf')		 
            } 
            @font-face
            {
                font-family: "Ubuntu Medium";
                src: url('fonts/Ubuntu-Medium.ttf')		 
            } 
            @font-face
            {
                font-family: "Ubuntu Regular";
                src: url('fonts/Ubuntu-Regular.ttf')		 
            } 
            @font-face
            {
                font-family: "Ubuntu Italic";
                src: url('fonts/Ubuntu-Italic.ttf')		 
            } 


            body {
                font-size: 14px;
                max-width:100%;
                margin: 0 auto;
                font-family: "Ubuntu Regular", "Ubuntu Light", arial;		
                font-size-adjust: none;
                width: 100%;
            }
            td { vertical-align: top; }

            .items td.blanktotal {
                background-color: #FFFFFF;
                border: 0mm none #fff;
                border-top: 0.1mm solid #fff;
                border-right: 0.1mm solid #fff;
            }

            .top-title span {
                display: block;
                font-size: 15px;
                color: #000;
            }
            .table-data tbody td.label{
                color: #2f2f2f;
                font-family: 'Ubuntu';
                font-weight: bold;
                font-size: 16px;
            }
            .table-data tfoot .grand_total td.label strong{                
                font-family: 'Ubuntu';
                font-weight: bold;
                font-size: 16px;
                line-height: 40px;
            }

            /* New Style for invoice 05 */
            /* Header style*/
            .myheader-iv{
                clear: both;
                float: left;
                margin: 0 3.6% 25px;
                position: relative;
                width: 92.8%;
            }

            .bottom-header-iv{
                clear: both;
                width: 100%;
                /*margin-bottom: 20px;*/
                float: left;
            }

            .logo-iv{
                width:30%;							
                text-align: right; 
                float: right;
            }

            .id-invoice-iv{
                text-align: left;
                width:40%;
                float:left;
                margin-left: 2%;
                margin-top: 15px;
            }
            .info-iv{
                width:40%; 
                color:#000;
                font-size: 15px;
                text-align: right; 
                float: right;
                margin-top: 0px;
            }

            /*  Main style */
            .main-content{				
                /* clear: both;
                margin: 0 3.6% 0 3.6%;
                max-width: 92.8%; */
                clear: both;
                margin: 0;
                max-width: 100%;

            }


            .info-cus{
                padding: 0 3.6%;
                width: 92.8%;				
                float: left;
            }

            .payment-box,
            .billing-box{
                width: 44%;
                float: left;					
                padding-left: 16px;
            }

            .shipping-box,
            .shipping-add-box{
                float: right;
                width: 44%;						
                padding-left: 16px;
            }

            .title-color{
                color: #FFFFFF;
                font-family: 'Ubuntu';
                font-size: 16px;
                font-weight: bold;
                line-height: 40px;
                padding: 0 10px;
                text-transform: uppercase;
            }

            /*viet*/
            .shipping-box ,
            .shipping-add-box,
            .payment-box,
            .billing-box {
                width:46%;
            }
            .top-main-if{
                float: left;
                width: 100%;
                clear: both;
            }
            .bottom-main-info{
                float: left;
                width: 100%;
                clear: both;
                margin-top: 50px;
                padding-bottom: 50px;
            }

            .invoice-totals{
                float: right;
                margin-top: 20px;
                margin-right: 3.6%;
                width: 55%;
            }

            .invoice-note{
                background: none repeat scroll 0 0 #FFFFFF;
                float: left;
                font-size: 14px;
                padding: 10px 0 20px 50px;
            }
            .wrap-table-order{

                float: left;
                margin: 0 3.6%;
                padding-left: 21px;
                width: 90.3%;
                margin-top: -28px;
            }


            .grandtotal{
                background: none repeat scroll 0 0;
                float: right;

            }
            .grandtotal tfoot td{
                text-align:right;
                padding:5px 20px;
                /*border-top: 5px solid #fff;*/
            }
            .grandtotal tbody td{
                border: 0 none; 
                text-align: right;
            }
            table thead td{
                font-size: 18px;
                color: #fff;
                text-align: center;				 
                font-weight: bold;
                padding: 12px 10px;
                text-transform: uppercase;
                vertical-align: middle;
            }
            .items td {                
                /*border-bottom: 1px solid #d6d6d6;*/

            }
            .tbody-2{
                border-bottom: 2px solid black;
            }
            .tbody-2 td{
                background: #e9e9e9;				
            }
            .table-data tbody {
                text-align: left;
            }
            .wrap-table-order .table-data tbody td{                
                padding: 12px 10px;
                color: #2f2f2f;
                background: #ffffff;

            }
            .table-data tbody td.a-right{                
                text-align: right;
            }
            .table-data tbody td.last{                
                text-align: right;
            }
            .items td.totals {                
                border: 0 none;
                text-align: right;
                padding: 5px 20px;
            }

            .grand-label{             
                color: #fff;
                font-size:20px;
                font-family: 'Ubuntu';

            }
            .grand-emph{
                color: #fff;
                font-size:20px;
                font-family: 'Ubuntu';
            }
            .totals-label{
                padding:5px;
                width:45%;
                float:left;
                text-align:right;
            }
            .totals-value{
                padding:5px;
                width:45%;
                float:left;
                text-align:right;
            }
        </style>
    </head>
    <body>
        
        <?php $numberOfCopies = $this->getRequest()->getParam('number_copies') ?>
        <?php $barcodeTemplateId = $this->getRequest()->getParam('barcode_template') ?>
        <?php $barcodeId = $this->getRequest()->getParam('barcode_ids') ?>
        <?php $displayBorder = $this->getRequest()->getParam('display_border') ?>        
        
        <?php $barcodeTemplate = Mage::getModel('simibarcode/barcodetemplate')->load($barcodeTemplateId) ?>
        <?php $barcode = Mage::getModel('simibarcode/barcode')->load($barcodeId) ?>
        
        
       
        <?php $width = $this->getRequest()->getParam('width'); ?>
        <?php $height = $this->getRequest()->getParam('height'); ?>
   
        
        
  
        <?php $html = Mage::app()->getLayout()->createBlock('adminhtml/template')
                                        ->setTemplate('simibarcode/printbarcode/template/'.$barcodeTemplate->getTemplate())
                                        ->assign('numberCopies', $numberOfCopies)
                                        ->assign('barcode', $barcode)
                                        ->assign('displayBorder', $displayBorder)
                                        ->assign('height', $height)
                                        ->assign('width', $width);

        ?>
        
        <div style="font-size: <?php echo round($width/10) ?>;">           
            <?php echo $html->toHtml();?>
        </div>
    </body>
</html>